#ifndef	__BFX_REFXMLDECLARATION_H__
#define	__BFX_REFXMLDECLARATION_H__

namespace BFX
{

//////////////////////////////////////////////////////////////////////////////

// Represents the xml declaration nodes: <?xml version='1.0' ...?>
class REFXMLDeclaration : public REFXMLLinkedNode
{
	friend class REFXMLDocument;
protected:
	REFXMLDeclaration(const UniString& strVersion, const UniString& strEncoding, const UniString& strStandalone, REFXMLDocument* pDoc);
public:
	virtual ~REFXMLDeclaration();

	// The version attribute (1.0) for <?xml version= '1.0' ... ?>
	UniString GetVersioin() const;
	// Specifies the value of the encoding attribute, as for <?xml version= '1.0' encoding= 'UTF-8' ?>
	UniString GetEncoding() const;
	void SetEncoding(const UniString& strEncoding);

	// Specifies the value of the standalone attribute.
	UniString GetStandalone() const;
	void SetStandalone(const UniString& strStandalone);

	//
	// Overrides
	//
	virtual UniString GetValue() const;
	virtual void SetValue(const UniString& strValue);

	// Gets or sets the concatenated values of the node and all its children.
	virtual UniString GetInnerText() const;
	virtual void SetInnerText(const UniString& strText) const;

	// Gets the name of the node.
	virtual UniString GetName() const;
	// Gets the name of the current node without the namespace prefix.
	virtual UniString GetLocalName() const;

	// Gets the type of the current node.
	virtual XMLNodeType GetNodeType() const;

	// Saves the node to the specified XmlWriter.
	virtual void WriteTo(REFXMLWriter* w) const;
	// Saves all the children of the node to the specified XmlWriter.
	virtual void WriteContentTo(REFXMLWriter* w) const;

private:
	UniString	m_strVersion;
	UniString	m_strEncoding;
	UniString	m_strStandalone;
};

}	//	namespace BFX

#endif	//	__BFX_REFXMLDECLARATION_H__
